home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / ColorSync 2.1.2 GM / Interfaces / CIncludes / CMAcceleration.h next >
Encoding:
C/C++ Source or Header  |  1997-02-18  |  3.9 KB  |  127 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMAcceleration.h
  3.  
  4.      Contains:    ColorSync 2.0 Acceleration Component Interfaces
  5.  
  6.      Version:    ColorSync 2.1
  7.  
  8.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  9.                  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18.  
  19. #ifndef __CMACCELERATION__
  20. #define __CMACCELERATION__
  21.  
  22. #ifndef __MEMORY__
  23. #include <Memory.h>
  24. #endif
  25. #ifndef __COMPONENTS__
  26. #include <Components.h>
  27. #endif
  28. #ifndef __CMAPPLICATION__
  29. #include <CMApplication.h>
  30. #endif
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. #if PRAGMA_IMPORT_SUPPORTED
  37. #pragma import on
  38. #endif
  39.  
  40. #if PRAGMA_ALIGN_SUPPORTED
  41. #pragma options align=mac68k
  42. #endif
  43.  
  44.  
  45. /* –––––––––––––––––––––––––––––––––––––– version info */
  46.  
  47. enum {
  48.     cmAccelerationInterfaceVersion = 1
  49. };
  50.  
  51. /* –––––––––––––––––––––––––––––––––––––– Component Type */
  52.  
  53. enum {
  54.     cmAccelerationComponentType    = 'csac'
  55. };
  56.  
  57. /* –––––––––––––––––––––––––––––––––––––– Required Component function selectors */
  58.  
  59. enum {
  60.     cmLoadTables                = 0,
  61.     cmCalculateData                = 1
  62. };
  63.  
  64. /* –––––––––––––––––––––––––––––––––––––– table data for acceleration component */
  65. struct CMAccelerationTableData {
  66.     long                             inputLutEntryCount;            /* count of entries for input lut for one dimension*/
  67.     long                             inputLutWordSize;            /* count of bits of each entry ( e.g. 16 for WORD )*/
  68.     Handle                             inputLut;                    /* handle to input lut*/
  69.     long                             outputLutEntryCount;        /* count of entries for output lut for one dimension    */
  70.     long                             outputLutWordSize;            /* count of bits of each entry ( e.g. 8 for BYTE )*/
  71.     Handle                             outputLut;                    /* handle to output lut*/
  72.     long                             colorLutInDim;                /* input dimension  ( e.g. 3 for LAB ; 4 for CMYK )*/
  73.     long                             colorLutOutDim;                /* output dimension ( e.g. 3 for LAB ; 4 for CMYK )*/
  74.     long                             colorLutGridPoints;            /* count of gridpoints for color lut ( for one Dimension )    */
  75.     long                             colorLutWordSize;            /* count of bits of each entry ( e.g. 8 for BYTE )*/
  76.     Handle                             colorLut;                    /* handle to color lut*/
  77.     CMBitmapColorSpace                 inputColorSpace;            /* packing info for input*/
  78.     CMBitmapColorSpace                 outputColorSpace;            /* packing info for output*/
  79.     void *                            userData;
  80.     unsigned long                     reserved1;
  81.     unsigned long                     reserved2;
  82.     unsigned long                     reserved3;
  83.     unsigned long                     reserved4;
  84.     unsigned long                     reserved5;
  85. };
  86. typedef struct CMAccelerationTableData CMAccelerationTableData;
  87.  
  88. typedef CMAccelerationTableData *CMAccelerationTableDataPtr;
  89. typedef CMAccelerationTableDataPtr *CMAccelerationTableDataHdl;
  90. /* –––––––––––––––––––––––––––––––––––––– calc data for acceleration component */
  91. struct CMAccelerationCalcData {
  92.     long                             pixelCount;                    /* count of input pixels*/
  93.     Ptr                             inputData;                    /* input array*/
  94.     Ptr                             outputData;                    /* output array*/
  95.     unsigned long                     reserved1;
  96.     unsigned long                     reserved2;
  97. };
  98. typedef struct CMAccelerationCalcData CMAccelerationCalcData;
  99.  
  100. typedef CMAccelerationCalcData *CMAccelerationCalcDataPtr;
  101. typedef CMAccelerationCalcDataPtr *CMAccelerationCalcDataHdl;
  102. /*
  103.  ———————————————————————————————————————————————————————————————————————————————————————————————— 
  104.                 A c c e l e r a t i o n   C o m p o n e n t   I n t e r f a c e s
  105.  ———————————————————————————————————————————————————————————————————————————————————————————————— 
  106. */
  107. extern pascal CMError CMAccelerationLoadTables(ComponentInstance CMSession, CMAccelerationTableDataPtr tableData)
  108.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
  109.  
  110. extern pascal CMError CMAccelerationCalculateData(ComponentInstance CMSession, CMAccelerationCalcDataPtr calcData)
  111.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
  112.  
  113. #if PRAGMA_ALIGN_SUPPORTED
  114. #pragma options align=reset
  115. #endif
  116.  
  117. #if PRAGMA_IMPORT_SUPPORTED
  118. #pragma import off
  119. #endif
  120.  
  121. #ifdef __cplusplus
  122. }
  123. #endif
  124.  
  125. #endif /* __CMACCELERATION__ */
  126.  
  127.